import UIKit

@available(iOS 2.0, *)
extension QKC where AA :UITextField {
		// default is nil
    open func text_qk_s(_ text:  String? ) -> QKC<AA,YY,ZZ, String? >{
		return link(next: text).then_QK { $0.value.text = text }
	}
    open func text_qk_g() -> QKC<AA,YY,ZZ, String? >{
		 self +^ self.value.text
	}

		// default is nil
    @available(iOS 6.0, *)
     open func attributedText_qk_s(_ attributedText:  NSAttributedString? ) -> QKC<AA,YY,ZZ, NSAttributedString? >{
		return link(next: attributedText).then_QK { $0.value.attributedText = attributedText }
	}
    @available(iOS 6.0, *)
     open func attributedText_qk_g() -> QKC<AA,YY,ZZ, NSAttributedString? >{
		 self +^ self.value.attributedText
	}

		// default is nil. use opaque black
    open func textColor_qk_s(_ textColor:  UIColor? ) -> QKC<AA,YY,ZZ, UIColor? >{
		return link(next: textColor).then_QK { $0.value.textColor = textColor }
	}
    open func textColor_qk_g() -> QKC<AA,YY,ZZ, UIColor? >{
		 self +^ self.value.textColor
	}

		// default is nil. use system font 12 pt
    open func font_qk_s(_ font:  UIFont? ) -> QKC<AA,YY,ZZ, UIFont? >{
		return link(next: font).then_QK { $0.value.font = font }
	}
    open func font_qk_g() -> QKC<AA,YY,ZZ, UIFont? >{
		 self +^ self.value.font
	}

		// default is NSLeftTextAlignment
    open func textAlignment_qk_s(_ textAlignment:  NSTextAlignment ) -> QKC<AA,YY,ZZ, NSTextAlignment >{
		return link(next: textAlignment).then_QK { $0.value.textAlignment = textAlignment }
	}
    open func textAlignment_qk_g() -> QKC<AA,YY,ZZ, NSTextAlignment >{
		 self +^ self.value.textAlignment
	}

		// default is UITextBorderStyleNone. If set to UITextBorderStyleRoundedRect, custom background images are ignored.
    open func borderStyle_qk_s(_ borderStyle:  UITextField.BorderStyle ) -> QKC<AA,YY,ZZ, UITextField.BorderStyle >{
		return link(next: borderStyle).then_QK { $0.value.borderStyle = borderStyle }
	}
    open func borderStyle_qk_g() -> QKC<AA,YY,ZZ, UITextField.BorderStyle >{
		 self +^ self.value.borderStyle
	}

	
    

		// default is nil. string is drawn 70% gray
    open func placeholder_qk_s(_ placeholder:  String? ) -> QKC<AA,YY,ZZ, String? >{
		return link(next: placeholder).then_QK { $0.value.placeholder = placeholder }
	}
    open func placeholder_qk_g() -> QKC<AA,YY,ZZ, String? >{
		 self +^ self.value.placeholder
	}

		// default is nil
    @available(iOS 6.0, *)
     open func attributedPlaceholder_qk_s(_ attributedPlaceholder:  NSAttributedString? ) -> QKC<AA,YY,ZZ, NSAttributedString? >{
		return link(next: attributedPlaceholder).then_QK { $0.value.attributedPlaceholder = attributedPlaceholder }
	}
    @available(iOS 6.0, *)
     open func attributedPlaceholder_qk_g() -> QKC<AA,YY,ZZ, NSAttributedString? >{
		 self +^ self.value.attributedPlaceholder
	}

		// default is NO which moves cursor to location clicked. if YES, all text cleared
    open func clearsOnBeginEditing_qk_s(_ clearsOnBeginEditing:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: clearsOnBeginEditing).then_QK { $0.value.clearsOnBeginEditing = clearsOnBeginEditing }
	}
    open func clearsOnBeginEditing_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.clearsOnBeginEditing
	}

		// default is NO. if YES, text will shrink to minFontSize along baseline
    open func adjustsFontSizeToFitWidth_qk_s(_ adjustsFontSizeToFitWidth:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: adjustsFontSizeToFitWidth).then_QK { $0.value.adjustsFontSizeToFitWidth = adjustsFontSizeToFitWidth }
	}
    open func adjustsFontSizeToFitWidth_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.adjustsFontSizeToFitWidth
	}

		// default is 0.0. actual min may be pinned to something readable. used if adjustsFontSizeToFitWidth is YES
    open func minimumFontSize_qk_s(_ minimumFontSize:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: minimumFontSize).then_QK { $0.value.minimumFontSize = minimumFontSize }
	}
    open func minimumFontSize_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.minimumFontSize
	}

		// default is nil. weak reference
     open func delegate_qk_s(_ delegate:  UITextFieldDelegate? ) -> QKC<AA,YY,ZZ, UITextFieldDelegate? >{
		return link(next: delegate).then_QK { $0.value.delegate = delegate }
	}
     open func delegate_qk_g() -> QKC<AA,YY,ZZ, UITextFieldDelegate? >{
		 self +^ self.value.delegate
	}

		// default is nil. draw in border rect. image should be stretchable
    open func background_qk_s(_ background:  UIImage? ) -> QKC<AA,YY,ZZ, UIImage? >{
		return link(next: background).then_QK { $0.value.background = background }
	}
    open func background_qk_g() -> QKC<AA,YY,ZZ, UIImage? >{
		 self +^ self.value.background
	}

		// default is nil. ignored if background not set. image should be stretchable
    open func disabledBackground_qk_s(_ disabledBackground:  UIImage? ) -> QKC<AA,YY,ZZ, UIImage? >{
		return link(next: disabledBackground).then_QK { $0.value.disabledBackground = disabledBackground }
	}
    open func disabledBackground_qk_g() -> QKC<AA,YY,ZZ, UIImage? >{
		 self +^ self.value.disabledBackground
	}

    open func isEditing_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isEditing
	}

		// default is NO. allows editing text attributes with style operations and pasting rich text
    @available(iOS 6.0, *)
    open func allowsEditingTextAttributes_qk_s(_ allowsEditingTextAttributes:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: allowsEditingTextAttributes).then_QK { $0.value.allowsEditingTextAttributes = allowsEditingTextAttributes }
	}
    @available(iOS 6.0, *)
    open func allowsEditingTextAttributes_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.allowsEditingTextAttributes
	}

	
    
	// text field, and a standard clear button is provided.
		// sets when the clear button shows up. default is UITextFieldViewModeNever
    open func clearButtonMode_qk_s(_ clearButtonMode:  UITextField.ViewMode ) -> QKC<AA,YY,ZZ, UITextField.ViewMode >{
		return link(next: clearButtonMode).then_QK { $0.value.clearButtonMode = clearButtonMode }
	}
    open func clearButtonMode_qk_g() -> QKC<AA,YY,ZZ, UITextField.ViewMode >{
		 self +^ self.value.clearButtonMode
	}

		// e.g. magnifying glass
    open func leftView_qk_s(_ leftView:  UIView? ) -> QKC<AA,YY,ZZ, UIView? >{
		return link(next: leftView).then_QK { $0.value.leftView = leftView }
	}
    open func leftView_qk_g() -> QKC<AA,YY,ZZ, UIView? >{
		 self +^ self.value.leftView
	}

		// sets when the left view shows up. default is UITextFieldViewModeNever
    open func leftViewMode_qk_s(_ leftViewMode:  UITextField.ViewMode ) -> QKC<AA,YY,ZZ, UITextField.ViewMode >{
		return link(next: leftViewMode).then_QK { $0.value.leftViewMode = leftViewMode }
	}
    open func leftViewMode_qk_g() -> QKC<AA,YY,ZZ, UITextField.ViewMode >{
		 self +^ self.value.leftViewMode
	}

		// e.g. bookmarks button
    open func rightView_qk_s(_ rightView:  UIView? ) -> QKC<AA,YY,ZZ, UIView? >{
		return link(next: rightView).then_QK { $0.value.rightView = rightView }
	}
    open func rightView_qk_g() -> QKC<AA,YY,ZZ, UIView? >{
		 self +^ self.value.rightView
	}

		// sets when the right view shows up. default is UITextFieldViewModeNever
    open func rightViewMode_qk_s(_ rightViewMode:  UITextField.ViewMode ) -> QKC<AA,YY,ZZ, UITextField.ViewMode >{
		return link(next: rightViewMode).then_QK { $0.value.rightViewMode = rightViewMode }
	}
    open func rightViewMode_qk_g() -> QKC<AA,YY,ZZ, UITextField.ViewMode >{
		 self +^ self.value.rightViewMode
	}

	// set while first responder, will not take effect until reloadInputViews is called.
    open func inputView_qk_s(_ inputView:  UIView?) -> QKC<AA,YY,ZZ, UIView?>{
		return link(next: inputView).then_QK { $0.value.inputView = inputView }
	}
    open func inputView_qk_g() -> QKC<AA,YY,ZZ, UIView?>{
		 self +^ self.value.inputView
	}

    open func inputAccessoryView_qk_s(_ inputAccessoryView:  UIView?) -> QKC<AA,YY,ZZ, UIView?>{
		return link(next: inputAccessoryView).then_QK { $0.value.inputAccessoryView = inputAccessoryView }
	}
    open func inputAccessoryView_qk_g() -> QKC<AA,YY,ZZ, UIView?>{
		 self +^ self.value.inputAccessoryView
	}

		// defaults to NO. if YES, the selection UI is hidden, and inserting text will replace the contents of the field. changing the selection will automatically set this to NO.
    @available(iOS 6.0, *)
    open func clearsOnInsertion_qk_s(_ clearsOnInsertion:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: clearsOnInsertion).then_QK { $0.value.clearsOnInsertion = clearsOnInsertion }
	}
    @available(iOS 6.0, *)
    open func clearsOnInsertion_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.clearsOnInsertion
	}

	// drawing and positioning overrides
    open func borderRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.borderRect(forBounds:bounds)
	}

    open func textRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.textRect(forBounds:bounds)
	}

    open func placeholderRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.placeholderRect(forBounds:bounds)
	}

    open func editingRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.editingRect(forBounds:bounds)
	}

    open func clearButtonRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.clearButtonRect(forBounds:bounds)
	}

    open func leftViewRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.leftViewRect(forBounds:bounds)
	}

    open func rightViewRect_qk_f(forBounds bounds: CGRect) -> QKC<AA,YY,ZZ,CGRect>{
		 self +^ self.value.rightViewRect(forBounds:bounds)
	}

    open func drawText_qk_f(in rect: CGRect) -> QKC<AA,YY,ZZ, CGRect>{
		 self +^ self.value.drawText(in:rect) +^ rect
	}

    open func drawPlaceholder_qk_f(in rect: CGRect) -> QKC<AA,YY,ZZ, CGRect>{
		 self +^ self.value.drawPlaceholder(in:rect) +^ rect
	}

}

extension QKC where AA :UIView {
		// use to make the view or any subview that is the first responder resign (optionally force)
    open func endEditing_qk_f(_ force: Bool) -> QKC<AA,YY,ZZ,Bool >{
		 self +^ self.value.endEditing(force)
	}

}

